Optimal. Leaf size=61 \[ -\frac {2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d}-\frac {a^2+b^2}{b^3 d (a+b \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3587, 711}
\begin {gather*} -\frac {a^2+b^2}{b^3 d (a+b \tan (c+d x))}-\frac {2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \frac {\sec ^4(c+d x)}{(a+b \tan (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1+\frac {x^2}{b^2}}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{b^2}+\frac {a^2+b^2}{b^2 (a+x)^2}-\frac {2 a}{b^2 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac {2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d}-\frac {a^2+b^2}{b^3 d (a+b \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.37, size = 121, normalized size = 1.98 \begin {gather*} \frac {2 a^3 (\log (\cos (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x)))+b \left (2 a^2+b^2+2 a^2 \log (\cos (c+d x))-2 a^2 \log (a \cos (c+d x)+b \sin (c+d x))\right ) \tan (c+d x)+a b^2 \tan ^2(c+d x)}{a b^3 d (a+b \tan (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 57, normalized size = 0.93
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (d x +c \right )}{b^{2}}-\frac {a^{2}+b^{2}}{b^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {2 a \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) | \(57\) |
default | \(\frac {\frac {\tan \left (d x +c \right )}{b^{2}}-\frac {a^{2}+b^{2}}{b^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {2 a \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) | \(57\) |
risch | \(-\frac {4 i \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b -i a \right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right ) b^{2} d}+\frac {2 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{3} d}-\frac {2 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{3} d}\) | \(136\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 60, normalized size = 0.98 \begin {gather*} -\frac {\frac {a^{2} + b^{2}}{b^{4} \tan \left (d x + c\right ) + a b^{3}} + \frac {2 \, a \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{3}} - \frac {\tan \left (d x + c\right )}{b^{2}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 178 vs.
\(2 (61) = 122\).
time = 0.42, size = 178, normalized size = 2.92 \begin {gather*} -\frac {2 \, b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - b^{2} + {\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right )}{a b^{3} d \cos \left (d x + c\right )^{2} + b^{4} d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{4}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 71, normalized size = 1.16 \begin {gather*} -\frac {\frac {2 \, a \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}} - \frac {\tan \left (d x + c\right )}{b^{2}} - \frac {2 \, a b \tan \left (d x + c\right ) + a^{2} - b^{2}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{3}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.72, size = 67, normalized size = 1.10 \begin {gather*} \frac {\mathrm {tan}\left (c+d\,x\right )}{b^2\,d}-\frac {a^2+b^2}{b\,d\,\left (\mathrm {tan}\left (c+d\,x\right )\,b^3+a\,b^2\right )}-\frac {2\,a\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{b^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________